Goes on: Opacity
Fades in after the layer starts and out before it ends. Trim the layer and the fades follow.

// Auto Fade — Coherent Motion Expressions · getcoherent.app/resources
var fadeIn = 0.3, fadeOut = 0.3; // seconds
var a = Math.min(linear(time, inPoint, inPoint + fadeIn, 0, 1), linear(time, outPoint - fadeOut, outPoint, 1, 0));
value * a
